package bean_test;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAttribute;

import java.util.List;

 
/**
 * The persistent class for the utente database table.
 * 
 */
//@Entity
@XmlAccessorType(XmlAccessType.NONE)
@Table(name="Utente")
public class Utente implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@XmlAttribute
	private Integer id_utente;
	@XmlAttribute
	private String cognome;
	@XmlAttribute
	private String email;
	@XmlAttribute
	private String nome;
	@XmlAttribute
	private String password;
	@XmlAttribute
	private String username;

	//bi-directional many-to-one association to Casa
	@OneToMany(mappedBy="utente", fetch = FetchType.LAZY )
	private List<bean_test.Casa> casa;

	public Utente(){
		
	}
	public Utente(String nome,String cognome,String email,String username,String password){
		
		this.nome=nome;
		this.cognome=cognome;
		this.email=email;
		this.username=username;
		this.password=password;
	}

	public Integer getIdUtente() {
		return this.id_utente;
	}

	public void setIdUtente(Integer idUtente) {
		this.id_utente = idUtente;
	}

	public String getCognome() {
		return this.cognome;
	}

	public void setCognome(String cognome) {
		this.cognome = cognome;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public List<bean_test.Casa> getCase() {
		return this.casa;
	}

	public void setCase(List<bean_test.Casa> casa) {
		this.casa=casa;
	}

	



}